//
//  YTCameraVC.m
//  YUNT
//
//  Created by 梁炜东 on 2017/11/20.
//  Copyright © 2017年 梁炜东. All rights reserved.
//

#import "YTCameraVC.h"
#import "YTCameraCell.h"
#import "YTCameraHead.h"

@interface YTCameraVC ()

@end

@implementation YTCameraVC

- (void)viewDidLoad
{
    [super viewDidLoad];
    [self.backBtn setTitle:Language(@"设置") forState:UIControlStateNormal];
    self.titleLabel.text = Language(@"相机");
    [self.rightBtn setTitle:Language(@"完成") forState:UIControlStateNormal];
    [self.myTableView registerClass:[YTCameraCell class] forCellReuseIdentifier:@"YTCameraCell"];
}
-(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
{
    YTCameraHead *head = [[YTCameraHead alloc] init];
    [head configObject:self.sectionData[section]];
    return head;
}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    YTCameraCell *cell = [tableView dequeueReusableCellWithIdentifier:@"YTCameraCell" forIndexPath:indexPath];
    cell.indexPath = indexPath;
    [cell configObject:self.dataSources[indexPath.section]];
    return cell;
}

@end
